<template>
  <!-- 月累业绩明细表 :span-method="objectSpanMethod" -->
  <el-table :data="tableData" style="width: 100%" border>
    <el-table-column prop="area" label="区域" width="180"> </el-table-column>
    <el-table-column prop="customerName" label="客户名称" width="180">
    </el-table-column>
    <el-table-column prop="daySellMoney" label="当日业绩"> </el-table-column>
    <el-table-column label="业绩排名" type="index" width="120">
    </el-table-column>
    <el-table-column prop="daySellingPrice" label="当日吊牌价">
    </el-table-column>
    <el-table-column prop="dayDiscount" label="日均折扣"> </el-table-column>
    <el-table-column prop="sequenceNumber" label="月销售单据数">
    </el-table-column>
    <el-table-column prop="monthlySellNumber" label="月销售件数">
    </el-table-column>
    <el-table-column prop="monthlyAverageSellingPrice" label="月平均售价">
    </el-table-column>
    <el-table-column prop="sellTarget" label="销售目标"> </el-table-column>
    <el-table-column prop="achievementRate" label="达成率"> </el-table-column>
  </el-table>
</template>

<script>
import { monthlyPerformanceSchedule } from '@/request/store/K_PerformanceAnalysis'
import { getMonth, deepClone } from '@/util/util'
export default {
  data() {
    return {
      tableData: []
    }
  },
  created() {
    this.monthlyPerformanceSchedule()
  },
  methods: {
    async monthlyPerformanceSchedule() {
      const { data } = await monthlyPerformanceSchedule()
      if (data && data.code === 200) {
        this.tableData = data.data
      }
    },
    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
      if (columnIndex === 0) {
        if (rowIndex == 0) {
          return {
            rowspan: 4,
            colspan: 1
          }
        } else {
          return {
            rowspan: 0,
            colspan: 0
          }
        }
      }
    }
  }
}
</script>

<style></style>
